WriteToFile Method (Field Object)
The WriteToFile
method saves the field value to a file in the file system.
Syntax
objField.WriteToFile(fileName)
Parameters
objField
Required. The
Field object.
fileName
Required. The
full path and file name for the saved field; for example,
C:\DOCUMENT\BUDGET.XLS.
Remarks
The WriteToFile
method writes the string or binary value of the Field object to the specified
file name. It overwrites any existing information in that file.
Note that WriteToFile
is not supported for simple types, such as Integer, Long, and Boolean. Visual
Basic provides common functions to read and write these base types to and from
files. The WriteToFile method fails if the Type property of the
Field is not a string or binary type.
Note that
some binary types are represented in hexadecimal string format by the OLE Messaging
Library and written in binary format. Comparison operations on the Value
property and the actual contents of the file can return not equal, even
though the values are equivalent.
In addition,
support for types can vary among providers. Not all providers support both the
String and Binary property types.
See Also